<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
       xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreatePersonTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <table border="0" cellpadding="10" cellspacing="10">
              <!--  <h:panelGrid columns="2">-->
                    <!--
                    <h:outputLabel value="#{bundle.CreatePersonLabel_perID}" for="perID" />                    
                    <h:inputHidden id="perID" value="#{personController.selected.perID}" title="#{bundle.CreatePersonTitle_perID}" required="true" requiredMessage="#{bundle.CreatePersonRequiredMessage_perID}"/>
                    -->
                    <tr>
                        <td><h:outputLabel value="#{bundle.CreatePersonLabel_firstName}" for="firstName" /></td>
                        <td><h:inputText id="firstName" value="#{personController.selected.firstName}" title="#{bundle.CreatePersonTitle_firstName}" /></td>
                    </tr>
                    <tr>
                        <td><h:outputLabel value="#{bundle.CreatePersonLabel_lastName}" for="lastName" /></td>
                        <td><h:inputText id="lastName" value="#{personController.selected.lastName}" title="#{bundle.CreatePersonTitle_lastName}" /></td>
                    </tr>
                    <tr>
                        <td><h:outputLabel value="#{bundle.CreatePersonLabel_gender}" for="gender" /></td>
                        <td> <h:inputText id="gender" value="#{personController.selected.gender}" title="#{bundle.CreatePersonTitle_gender}" /></td>
                    </tr>
                    <tr>
                        <td> <h:outputLabel value="#{bundle.CreatePersonLabel_dateOfBirth}" for="dateOfBirth" /></td>
                        <td>
                            <p:calendar value="#{person.dateOfBirth}" mode="inline" navigator="true"/>
                             
                           
                            <!--
                            <h:inputText id="dateOfBirth" value="#{personController.selected.dateOfBirth}" title="#{bundle.CreatePersonTitle_dateOfBirth}" >
                        <f:convertDateTime pattern="dd MMM, yyyy" /> 
                            </h:inputText>
                           -->
</td>
                    </tr>
                    <tr>
                        <td> <h:outputLabel value="#{bundle.CreatePersonLabel_address}" for="address" /></td>
                        <td><h:inputText id="address" value="#{personController.selected.address}" title="#{bundle.CreatePersonTitle_address}" /></td>
                    </tr>
                    <tr>
                        <td><h:outputLabel value="#{bundle.CreatePersonLabel_phone}" for="phone" /></td>
                        <td><h:inputText id="phone" value="#{personController.selected.phone}" title="#{bundle.CreatePersonTitle_phone}" /></td>
                    </tr>
                    <tr>
                        <td><h:outputLabel value="#{bundle.CreatePersonLabel_cardNo}" for="cardNo" /></td>
                        <td><h:inputText id="cardNo" value="#{personController.selected.cardNo}" title="#{bundle.CreatePersonTitle_cardNo}" /></td>
                    </tr>
                    <tr>
                        <td><h:outputLabel value="#{bundle.CreatePersonLabel_isVisiable}" for="isVisiable" /></td>
                        <td><h:inputText id="isVisiable" value="#{personController.selected.isVisiable}" title="#{bundle.CreatePersonTitle_isVisiable}" /></td>
                    </tr>
                      <!--
                    <h:inputText id="isVisiable" value="#{personController.selected.isVisiable}" title="#{bundle.CreatePersonTitle_isVisiable}" />
                    <h:outputLabel value="#{bundle.CreatePersonLabel_student}" for="student" />
                    <h:selectOneMenu id="student" value="#{personController.selected.student}" title="#{bundle.CreatePersonTitle_student}" >
                        <f:selectItems value="#{studentController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreatePersonLabel_speaker}" for="speaker" />
                    <h:selectOneMenu id="speaker" value="#{personController.selected.speaker}" title="#{bundle.CreatePersonTitle_speaker}" >
                        <f:selectItems value="#{speakerController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreatePersonLabel_cardTypeID}" for="cardTypeID" />
                    <h:selectOneMenu id="cardTypeID" value="#{personController.selected.cardTypeID}" title="#{bundle.CreatePersonTitle_cardTypeID}" >
                        <f:selectItems value="#{cardTypeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    -->
               <!-- </h:panelGrid>-->
               </table>
                <br />
                <h:commandLink action="#{personController.create}" value="#{bundle.CreatePersonSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{personController.prepareList}" value="#{bundle.CreatePersonShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreatePersonIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
